An electrical box is used for connecting a ceiling fan or light fixture to a ceiling joist. The box is fastened to the joist and provides a compartment that contains electrical connections for the fan or fixture.